#ifndef TETRAHEDRON_H
#define TETRAHEDRON_H

#include "Object3D.h"

typedef struct _TRIANGLE
{
    QVector4D v[3];
    QVector4D color;
    QVector3D n;
}TRIANGLE;

class Tetrahedron : public Object3D
{
    TRIANGLE faces[4];
    QVector4D v0;
    QVector4D v1;
    QVector4D v2;
    QVector4D v3;
    int mI;
public:
    explicit Tetrahedron(const QVector3D& center = QVector3D(),
                    QObject *parent = 0);
    explicit Tetrahedron(const Tetrahedron& tt);
    ~Tetrahedron();

    virtual Object3D* copy() const;

    TRIANGLE getTrianguloFrente();

    bool dentro(const QVector4D&);

private:
    virtual void drawGeometry(void);

    void storeList()const;

    void constroiFaces();

    void beforeDraw();
};

#endif //TETRAHEDRON_H
